package com.qcby.hengxiang.learn.service.Impl;

import com.qcby.hengxiang.learn.dao.AccessLogMapper;
import com.qcby.hengxiang.learn.dao.UserMapper;
import com.qcby.hengxiang.learn.entity.SiteAccessCount;
import com.qcby.hengxiang.learn.entity.User;
import com.qcby.hengxiang.learn.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Autowired
    private AccessLogMapper accessLogMapper;

    @Override
    public List<User> getUsers() {
        // TODO 具体的业务逻辑
        List<User> users = userMapper.getUsers();

        return users;
    }

    @Override
    public List<SiteAccessCount> getSiteAccessCount() {
        return accessLogMapper.getSiteAccessCount();
    }

    @Override
    public User getUser(String userName) {
        return userMapper.getUser(userName);
    }
}
